Bentley Map V8i (SELECTseries 10) Help

To Use a GUID Field for an Existing Table

  1. Add the ID field of type vachar2.

    ALTER TABLE Buildings add (PK VARCHAR2(64));

  2. Set the ID field to a GUID following XFM syntax.

    update Buildings set PK = LOWER (substr(sys_guid(), 1, 8)||'-'||substr(sys_guid(),9,4)||'-'||substr(sys_guid(),13,4)||'-'||substr(sys_guid(),17,4)||'-'||substr(sys_guid(),21,12));

  3. Set the primary key for the table.

    ALTER TABLE Buildings ADD CONSTRAINT Buildings_PK PRIMARY KEY (PK);